package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RoomRecordmessageMapper;
import com.ruoyi.system.domain.RoomRecordmessage;
import com.ruoyi.system.service.IRoomRecordmessageService;

/**
 * 房间信息记录Service业务层处理
 * 
 * @author xyz
 * @date 2025-07-01
 */
@Service
public class RoomRecordmessageServiceImpl implements IRoomRecordmessageService 
{
    @Autowired
    private RoomRecordmessageMapper roomRecordmessageMapper;

    /**
     * 查询房间信息记录
     * 
     * @param id 房间信息记录主键
     * @return 房间信息记录
     */
    @Override
    public RoomRecordmessage selectRoomRecordmessageById(Long id)
    {
        return roomRecordmessageMapper.selectRoomRecordmessageById(id);
    }

    /**
     * 查询房间信息记录列表
     * 
     * @param roomRecordmessage 房间信息记录
     * @return 房间信息记录
     */
    @Override
    public List<RoomRecordmessage> selectRoomRecordmessageList(RoomRecordmessage roomRecordmessage)
    {
        return roomRecordmessageMapper.selectRoomRecordmessageList(roomRecordmessage);
    }

    /**
     * 新增房间信息记录
     * 
     * @param roomRecordmessage 房间信息记录
     * @return 结果
     */
    @Override
    public int insertRoomRecordmessage(RoomRecordmessage roomRecordmessage)
    {
        return roomRecordmessageMapper.insertRoomRecordmessage(roomRecordmessage);
    }

    /**
     * 修改房间信息记录
     * 
     * @param roomRecordmessage 房间信息记录
     * @return 结果
     */
    @Override
    public int updateRoomRecordmessage(RoomRecordmessage roomRecordmessage)
    {
        return roomRecordmessageMapper.updateRoomRecordmessage(roomRecordmessage);
    }

    /**
     * 批量删除房间信息记录
     * 
     * @param ids 需要删除的房间信息记录主键
     * @return 结果
     */
    @Override
    public int deleteRoomRecordmessageByIds(Long[] ids)
    {
        return roomRecordmessageMapper.deleteRoomRecordmessageByIds(ids);
    }

    /**
     * 删除房间信息记录信息
     * 
     * @param id 房间信息记录主键
     * @return 结果
     */
    @Override
    public int deleteRoomRecordmessageById(Long id)
    {
        return roomRecordmessageMapper.deleteRoomRecordmessageById(id);
    }

    @Override
    public List<RoomRecordmessage> selectRoomRecordmessageByUserId(String userId) {
        return roomRecordmessageMapper.selectRoomRecordmessageByUserId(userId);
    }

    /**
     * 根据房间名称和日期范围查询房间记录信息
     * 
     * @param cc 房间名称
     * @param startDate 开始日期
     * @param endDate 结束日期
     * @return 房间记录信息集合
     */
    @Override
    public List<RoomRecordmessage> selectRoomRecordmessageByDateRange(String cc, Date startDate, Date endDate) {
        return roomRecordmessageMapper.selectRoomRecordmessageByDateRange(cc, startDate, endDate);
    }

    /**
     * 根据房间名称和时间查询房间记录信息（简化版）
     * 
     * @param cc 房间名称
     * @param recordTime 记录时间（字符串格式：yyyy-MM-dd）
     * @return 房间记录信息集合
     */
    @Override
    public List<RoomRecordmessage> selectRoomRecordmessageByCcAndTime(String cc, String recordTime) {
        return roomRecordmessageMapper.selectRoomRecordmessageByCcAndTime(cc, recordTime);
    }
}
